Skip to content

Instantly share code, notes, and snippets.

@eshaham
eshaham / README.md
Last active February 20, 2026 19:43
Claude Code: Auto-sync MCP servers to git worktrees (macOS launchd)

Claude Code: Auto-sync MCP servers to git worktrees (macOS)

When Claude Code (or Claude Desktop) creates a git worktree, it registers a new project entry in ~/.claude.json — but the parent project's local-scoped MCP servers don't carry over. This means you have to manually reconfigure MCP servers for every new worktree session.

This solution uses a macOS launchd agent that watches ~/.claude.json for changes and automatically copies MCP server config from the parent project to any new worktree.

What gets copied

  • mcpServers — your MCP server configurations
  • disabledMcpServers — which servers are disabled
@karpathy
karpathy / microgpt.py
Last active February 20, 2026 19:41
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@startergo
startergo / qemu-img.md
Last active February 20, 2026 19:40
How to: Use qemu-img command to convert between vmdk, raw, qcow2, vdi, vhd, vhdx formats/disk images (qemu-img create, snapshot, resize etc.)
  • First we need to have qemu installed on the system, for most of Linux systems, we can install “qemu-utils” for Windows we can download QEMU disk image utility from here

  • Other related questions

How to open raw disk from VMware
How to open qcow2 disk from VMware
How to open vdi disk from VMware
How to open raw disk from Hyper-V
How to open qcow2 disk from Hyper-V
How to open vdi disk from Hyper-V
@titipata
titipata / macports_installation.md
Last active February 20, 2026 19:38
Easy description to install python using Macports

##Installing Python using Macports (beginner guide)

I think package management system is good for long-term installation. Since lab members use a lot of Apple product, I wrote Macports documentation which is package management system for Mac OSX which hopefully will be useful for members who use Mac. Note that this is not an official document but probably an easy way to get start with Macports. Macports depends mostly by its community and ones who update the port. We may have to migrate our ports when Mac announce new operating system. From my experience, it is normal to have some port problem with macports when new Mac operating system, for example, when Maverick or Yosemite was announced or when new XCode version were updated. It will take some time (a day or a week) for them to update the new port that are compatible with new operating system. But yeah, most ports work very well even though OS changes since the community is very active.

Macports

# ============================================
# Ghostty Terminal - Complete Configuration
# ============================================
# File: ~/.config/ghostty/config
# Reload: Cmd+Shift+, (macOS)
# View options: ghostty +show-config --default --docs
# --- Typography ---
font-family = JetBrainsMonoNerdFont
font-size = 14
esphome:
name: smart-cafe
friendly_name: Smart Cafe
on_boot:
priority: -100
then:
- lambda: |-
if (id(cold_lever).state) {
id(lever_state).publish_state("Cold");
} else if (id(hot_lever).state) {
@arashkaffamanesh
arashkaffamanesh / vmware.md
Created January 3, 2025 11:22 — forked from ayebrian/vmware.md
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024

How to run Multiple Claude Code Accounts

Run two Claude Code accounts simultaneously on your computer without re-authenticating by using separate configuration directories.

Notes

  • Requires separate Anthropic accounts (different emails).
  • Update Claude Code: npm install -g @anthropic-ai/claude-code.
  • If re-authentication occurs, verify CLAUDE_CONFIG_DIR with echo $CLAUDE_CONFIG_DIR.